public class Bus extends Automobile{
    //Bus子类中的私有属性
    private int Seatingcapacity;

    public int getSeatingcapacity() {
        return Seatingcapacity;
    }

    public void setSeatingcapacity(int seatingcapacity) {
        this.Seatingcapacity = seatingcapacity;
    }

    //无参构造器
    public Bus(){

    }

    //全参构造器
    public Bus(String brand,String plateNumber,int Seatingcapacity){
        //调用父类中的方法初始化brand，plateNumber
        super(brand,plateNumber);

        this.Seatingcapacity=Seatingcapacity;
    }
    
     //show方法
     public void show(){
        System.out.println("The brand of the car is: "+getBrand()+",Car license plate is: "+getPlateNumber()+ ",The type of the car is: "+Seatingcapacity );
    }

    public double getRent(int days) {
        double rent = 0.0;
        if (Seatingcapacity<=16&&Seatingcapacity>0) {
           rent = 400 * days;
        }
        else if(Seatingcapacity>=16&&Seatingcapacity<=80){
            rent = 600 * days;
        }
        else {
            rent = 999999999.999;
        }
        return rent;
    }

}
